package com.waterwolf.wolfbot.internal.input;

import java.awt.Canvas;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.image.BufferedImage;

import com.waterwolf.wolfbot.BasicLoader;

public class CanvasWrapper extends Canvas {

    private static final BufferedImage gameImage = new BufferedImage(
            764, 503, BufferedImage.TYPE_INT_ARGB);

    @Override
    public Graphics getGraphics() { // overridden graphics method
        final Graphics buffer = gameImage.getGraphics();
        
        BasicLoader.getBotGraphics(buffer);
        
        super.getGraphics().drawImage(gameImage, 0, 0, null);
        return buffer;
    }
    

    public static final BufferedImage getGameImage() {
        return gameImage;
    }
}
